package com.aidong.food.biz.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.aidong.food.biz.MstFoodBiz;
import com.aidong.food.dao.MstFoodDao;

@Service("mstFoodBiz")
public class MstFoodBizImpl implements MstFoodBiz {
	
	private MstFoodDao mstFoodDao;

	@Autowired
	public void setMstFoodDao(MstFoodDao mstFoodDao) {
		this.mstFoodDao = mstFoodDao;
	}

	/**
	 * 健康餐饮首页
	 * 产品列表
	 * @return
	 */
	@Override
	public List<Map<String, Object>> getMstFoodHome(Map<String, Object> map) {
		return mstFoodDao.getMstFoodHome(map);
	}

	/**
	 * 供应商规则列表
	 * @param foodId
	 * @return
	 */
	@Override
	public List<Map<String, Object>> getMstSupplyRule(Map<String, Object> map) {
		return mstFoodDao.getMstSupplyRule(map);
	}

	/**
	 * 供应规则详情
	 * @param ruleId
	 * @return
	 */
	@Override
	public Map<String, Object> getMstRuleDetail(Map<String, Object> map) {
		return mstFoodDao.getMstRuleDetail(map);
	}

	/**
	 * 购买信息
	 * @param ruleId
	 * @return
	 */
	@Override
	public Map<String, Object> getPurchaseInfo(Map<String, Object> map) {
		return mstFoodDao.getPurchaseInfo(map);
	}

	/**
	 * 不可购买日期
	 * @param ruleId
	 * @return
	 */
	@Override
	public List<Map<String, Object>> getFoodUnBuy(int ruleId) {
		return mstFoodDao.getFoodUnBuy(ruleId);
	}

	/**
	 * 根据日期取得不同的取餐时间区间
	 * @param ruleId
	 * @return
	 */
	@Override
	public Map<String, Object> getMealPickUp(Map<String, Object> map) {
		return mstFoodDao.getMealPickUp(map);
	}

	/**
	 * 供应商门店对应
	 * @return
	 */
	@Override
	public List<Map<String, Object>> getSupplyStore() {
		return mstFoodDao.getSupplyStore();
	}

	@Override
	public int getFoodShow() {
		// TODO Auto-generated method stub
		return mstFoodDao.getFoodShow();
	}

	@Override
	public String getPayInfo(int ruleId) {
		// TODO Auto-generated method stub
		return mstFoodDao.getPayInfo(ruleId);
	}

	@Override
	public List<Map<String, Object>> getHotRecommend() {
		// TODO Auto-generated method stub
		return mstFoodDao.getHotRecommend();
	}

	@Override
	public List<Map<String, Object>> getType(String prop,Integer enable) {
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("prop", prop);
		map.put("enable", enable);
		return mstFoodDao.getType(map);
	}
	/**
	 * 获取品牌
	 * @return
	 */
	public List<Map<String, Object>> getBrandType(Map<String,Object> map){
		return mstFoodDao.getBrandType(map);
	}
	
	/**
	 * 获取品牌
	 * @return
	 */
	public List<Map<String, Object>> getBrandTypeN(Map<String,Object> map){
		return mstFoodDao.getBrandTypeN(map);
	}
	
	public List<Map<String, Object>> getMstSupplyRuleNew(Map<String,Object> map){
		return mstFoodDao.getMstSupplyRuleNew(map);
	}
	/**
	 * 新供应规则
	 * @param map
	 * @return
	 */
	public List<Map<String, Object>> getMstSupplyRuleNew2(Map<String,Object> map){
		return mstFoodDao.getMstSupplyRuleNew2(map);
	}
	/**
	 * 商品详情
	 * @param map
	 * @return
	 */
	public Map<String, Object> getFoodDetailById(Map<String,Object> map){
		return mstFoodDao.getFoodDetailById(map);
	}
	/**
	 * 供应规则详情
	 * @param ruleId
	 * @return
	 */
	@Override
	public Map<String, Object> getMstRuleDetailNew(Map<String, Object> map) {
		return mstFoodDao.getMstRuleDetailNew(map);
	}
	/**
	 * 当前商品可选择的门店地址
	 * @param ruleId
	 * @return
	 */
	public List<Map<String, Object>> getMstStoreByFoodId(Map<String, Object> map){
		return mstFoodDao.getMstStoreByFoodId(map);
	}
	/**
	 * 常用自提地址
	 * @param ruleId
	 * @return
	 */
	public List<Map<String, Object>> getMyStoreByFoodId(Map<String, Object> map){
		return mstFoodDao.getMyStoreByFoodId(map);
	}
	/**
	 * 最近购买该产品地址
	 * @param ruleId
	 * @return
	 */
	public Map<String, Object> getStoreByFoodIdAndID(Map<String, Object> map){
		return mstFoodDao.getStoreByFoodIdAndID(map);
	}

	@Override
	public int getDefaultStoreId(Map<String, Object> map) {
		return mstFoodDao.getDefaultStoreId(map);
	}
}
